<?php
/**
 * 读取dedecms当前的模型配置，然后生成模型配置的缓存文件。
 */

$r = $db->query("SELECT id,addtable,typename,fieldset FROM phpcms_channeltype WHERE isshow = 1");
while ($s = $db->fetch_next()) {
	if ($s['id']<1) continue;
	$s['fields'] = model_field($s['fieldset']);
	unset($s['fieldset']);
	$model_data[$s['id']] = $s;
}
setcache('dede_model', $model_data, 'conversion');

ext_go('开始创建内容模型到PHPCMS V9。', 'filename=content_model');
